<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
		<meta charset="utf-8" />
	<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>

	 <div id="tittle">
    	岗位名称：<span>${name}</span>
    </div>
    <table class="tablelist tablelist_margin">
    	<thead>
    	<tr>
    	<th>序号</th>
        <th>企业名称</th>
        <th >岗位特殊需求</th>
        <th >地域</th>
		<th>联系人</th>
		<th>联系电话</th>
       <th>操作</th>
      </tr>
        </thead>
        <tbody>
         <c:forEach items="${EnterpriseInfoList}" var="enterpriseInfo"  varStatus="status">
      <tr>
         <td>${ status.index + 1}</td>
       	<td>${enterpriseInfo.name }</td>
         <td>${enterpriseInfo.enterpriseSpecialReq }</td>
         <td>${enterpriseInfo.theAddress }</td>
         <td>${enterpriseInfo.theContact }</td>
         <td>${enterpriseInfo.theContactPhone }</td>
         <td><a onclick="delJobenterprise('${enterpriseInfo.id}','${id}');" style="cursor: pointer;">删除</a></td>
       </tr>
		</c:forEach>
        </tbody>
    </table>
    <script src="js/jquery-1.7.2.js"></script>
     <script src="layer/layer.js"></script>
    <script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	function closeAll() {
		layer.alert('添加成功!', {
			skin : 'layer-ext-moon'
		}, function() {
			layer.closeAll(); 
			 location.reload();
		}); 
	}
	function delJobenterprise(EnterpriseId,JobId) {
		$.ajax({
			type: "POST",
			url: "jobinfo/delJobenterprise.do",
			data: { EnterpriseId : EnterpriseId, JobId : JobId},
			async: true,
			dataType: "json",
			success: function(data) {
				if("success" == data.result){
					layer.alert('删除成功!', {
			            skin: 'layer-ext-moon' 
					}, function(){
					 location.reload();
					 });
					}else {
						layer.alert('删除失败!', {
				            skin: 'layer-ext-moon' 
				        });
						}
				}
			})
	};
	</script>
</body>
</html>
